package com.vhuomai.product.mapper;

import com.vhuomai.mybatis.mapper.auto.AutoMapper;
import com.vhuomai.product.entity.BaseSpu;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author harris
 */
@Mapper
public interface SpuMapper extends AutoMapper<BaseSpu, Integer> {

    List<BaseSpu> findByCategoryId(@Param("categoryId") int categoryId, @Param("delFlag") boolean delFlag);
    
    @Delete("update base_spu set del_flag=1 where id=#{id}")
    void remove(@Param("id") int id);
}
